﻿using ForgottenTalez.GameStateManager.ScreenMan;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace ForgottenTalez.Renderers
{
    class WelcomeScreenRenderer: ScreenRenderer
    {
        public WelcomeScreenRenderer(ScreenManager ScreenManager) : base(ScreenManager) { }

        public override void Render(GameTime gameTime, float TransitionAlpha)
        {
            SpriteBatch spriteBatch = screenManager.SpriteBatch;
            SpriteFont font = screenManager.Font;

            string message = "Welcome Screen, Doen Awesome shit\n in met animations en glitter\n kyk in WelcomeScreenRenderer vir die code\n ENTER om aan te gaan";

            // Center the text in the viewport.
            Viewport viewport = screenManager.GraphicsDevice.Viewport;
            Vector2 viewportSize = new Vector2(viewport.Width, viewport.Height);
            Vector2 textSize = font.MeasureString(message);
            Vector2 textPosition = viewportSize * 0.5f;
            Color color = Color.Blue * TransitionAlpha;

            //Draw Text
            spriteBatch.DrawString(font,
                message,
                textPosition,
                color,
                0,
                textSize*0.5f,
                0.625f,
                SpriteEffects.None,
                0);
        }
    }
   
    
}
